package com.hy.properties.prop;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import java.util.List;
import java.util.Map;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/6/28
 * Time: 20:09
 */
@Data
@Validated
@ConfigurationProperties(prefix = "hy")
public class HyProperties {
    
    private boolean enabled;
    
    @NotNull
    private String name;
    
    private String site;
    
    private String author;
    
    private List<String> users;
    
    private Map<String, String> params;
    
    private Security security;
    
}

@Data
class Security {
    
    private String securityKey;
    
    private String securityCode;
    
}

